home *** CD-ROM | disk | FTP | other *** search
- { --------------------------------------
- WAIT for Timer to elapse or a KeyPress.
- If KeyPress was HOME key, WAIT waits
- for another KeyPress.
- -------------------------------------- }
- Procedure Wait ( NumberOfSeconds : Integer);
- begin
- repeat until Timer(NumberOfSeconds) or KeyPressed;
- if KeyPressed then
- begin
- read(Kbd,ch);
- StartElapsed := FALSE;
- if (ch = #27) and KeyPressed then
- begin
- read(Kbd,ch);
- if ch = #71 then
- begin
- repeat until KeyPressed;
- read(Kbd,ch);
- if (ch = #27 ) and KeyPressed then
- read(Kbd,ch);
- end;
- end;
- end;
- end { Wait };